package com.huazai.apply.manager.web.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @author EZTTU
 */
public class ContextListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        ServletContext servletContext = sce.getServletContext();
        servletContext.setAttribute("OnlinePeople", 0);
        System.out.println("服务已启动");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("服务已关闭");
    }
}
